package com.chance.cc.crawler.development.command.schedule.vm;

import com.chance.cc.crawler.development.command.job.domain.vm.pcauto.simple.*;
import com.chance.cc.crawler.development.command.schedule.CrawlerJobScheduleCommand;

/**
 * @Author Zhao.Hhuan
 * @Date Create in 2021/3/5 11:57
 * @Description
 *      太平洋号 板块
 **/
public class PcautoCrawlerJobSchedule {

    private static CrawlerJobScheduleCommand crawlerJobScheduleCommand =
            new CrawlerJobScheduleCommand("192.168.1.215",9589);


    public static void main(String[] args) {
//        repubflishCrawlerJobInfo(PcautoWebHjRealtimeCrawlerSchedulerJob.publishCrawlerScheduleJobInfo().generateCrawlerTriggerKey());
//        repubflishCrawlerJobInfo(PcautoWebHjTraceCrawlerSchedulerJob.publishCrawlerScheduleJobInfo().generateCrawlerTriggerKey());
//        repubflishCrawlerJobInfo(PcautoWebHjCoreSimpleCrawlerSchedulerJob.publishCrawlerScheduleJobInfo().generateCrawlerTriggerKey());
//        repubflishCrawlerJobInfo(PcautoWebHjSimpleCrawlerSchedulerJob.publishCrawlerScheduleJobInfo().generateCrawlerTriggerKey());
//        repubflishCrawlerJobInfo(PcautoWebHjCoreSimple1CrawlerSchedulerJob.publishCrawlerScheduleJobInfo().generateCrawlerTriggerKey());
//        repubflishCrawlerJobInfo(PcautoWebHjCoreSimple2CrawlerSchedulerJob.publishCrawlerScheduleJobInfo().generateCrawlerTriggerKey());
//        repubflishCrawlerJobInfo(PcautoWebHjCoreSimple41CrawlerSchedulerJob.publishCrawlerScheduleJobInfo().generateCrawlerTriggerKey());
//        repubflishCrawlerJobInfo(PcautoWebHjCoreSimple91CrawlerSchedulerJob.publishCrawlerScheduleJobInfo().generateCrawlerTriggerKey());
//        repubflishCrawlerJobInfo(PcautoWebHjCoreSimple92CrawlerSchedulerJob.publishCrawlerScheduleJobInfo().generateCrawlerTriggerKey());

        repubflishCrawlerJobInfo(PcAutoArticleSimpleCrawlerSchedulerJob.publishPcAutoCrawlerSchedulerJobInfo().generateCrawlerTriggerKey());
    }

    /**
     * 重新发布调度
     * @param triggerKey
     */
    public static void repubflishCrawlerJobInfo(String triggerKey){
        crawlerJobScheduleCommand.republishCrawlerJob(triggerKey,"crawler_dev_host");
    }

    /**
     * 去除调度
     * @param triggerKey
     */
    public static void deleteCrawlerJob(String triggerKey){
        crawlerJobScheduleCommand.deleteCrawlerJob(triggerKey,"crawler_dev_host");
    }

}
